package com.free.food.product.client;

import com.free.food.product.req.DecreaseStockReq;
import com.free.food.product.res.FindProductInfoRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 类功能描述：
 *
 * @author：刘富国
 * @createTime：2019-02-14 20:22
 */
@FeignClient(name = "product")
public interface ProductClient {

    @RequestMapping("/msg")
    String productMsg();


    @RequestMapping("/product/listForOrder")
    List<FindProductInfoRes> listForOrder(@RequestBody List<String> productIdList);

    /**
     * 减库存
     *
     * @param cartDTOList
     * @return
     */
    @RequestMapping("/product/decreaseStock")
    void decreaseStock(@RequestBody List<DecreaseStockReq> cartDTOList);
}
